package com.probox.order.api.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.probox.common.core.annotation.Excel;
import com.probox.common.core.enums.ServiceStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@ApiModel("售后节点信息")
public class OrderPostSaleNodeVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "节点ID")
    private Long nodeUid;

    /**
     * 售后ID
     */
    @Excel(name = "售后ID")
    @ApiModelProperty(value = "售后ID")
    private Long serviceUid;

    /**
     * 节点状态(0取消售后,1申请待处理,2处理中,3拒绝售后,4同意售后,,5售后完成)
     */
    @Excel(name = "节点状态(0取消售后,1申请待处理,2处理中,3拒绝售后,4同意售后,,5售后完成)")
    @ApiModelProperty(value = "节点状态(0取消售后,1申请待处理,2处理中,3拒绝售后,4同意售后,,5售后完成)")
    private String nodeStatus;

    /**
     * 节点描述
     */
    @Excel(name = "节点描述")
    @ApiModelProperty(value = "节点描述")
    private String nodeDesc;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    @ApiModelProperty(value = "创建人")
    private Long createUser;

    /**
     * 创建人名称
     */
    @Excel(name = "创建人名称")
    @ApiModelProperty(value = "创建人名称")
    private String createName;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;


    public String getNodeStatus(){
        return ServiceStatusEnum.getNameByKey(nodeStatus);
    }


}
